<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>TeamTest</title>

<link rel="stylesheet"
	href="http://code.jquery.com/qunit/qunit-1.15.0.css">
<script src="http://code.jquery.com/qunit/qunit-1.15.0.js"></script>
<script src="../../main/js/Team.js"></script>

<script>
    QUnit.test("Team properties Imperial", function(assert)
    {
        var team = Team.IMPERIAL;
        var properties = Team.properties[team];
        assert.equal(properties.name, "Imperial");
        assert.equal(properties.description, "Imperial team");
        assert.equal(properties.value, "imperial");
    });

    QUnit.test("Team properties Rebel", function(assert)
    {
        var team = Team.REBEL;
        var properties = Team.properties[team];
        assert.equal(properties.name, "Rebel");
        assert.equal(properties.description, "Rebel team");
        assert.equal(properties.value, "rebel");
    });

    QUnit.test("Team.opposite()", function(assert)
    {
        var team0 = Team.IMPERIAL;
        var team1 = Team.REBEL;
        assert.equal(Team.properties[team0].opposite, team1);
        assert.equal(Team.properties[team1].opposite, team0);
    });

    QUnit.test("Team.values()", function(assert)
    {
        assert.ok(Team.values);
        assert.equal(Team.values.length, 2);
        assert.equal(Team.values[0], Team.IMPERIAL);
        assert.equal(Team.values[1], Team.REBEL);
    });
</script>
</head>
<body>
	<div id="qunit"></div>
</body>
</html>
